<?php
/* [$WindsForce] (C)Hunzhiwange.COM Since 2012.03.17.
   Service统计用户安装($$)*/

!defined('Q_PATH') && exit;

class InstallController extends InitController{

	public function index(){
		// 传递参数
		$sIp=htmlspecialchars(trim(Q::G('ip')));
		$sDomain=htmlspecialchars(trim(Q::G('domain')));
		$sVersion=htmlspecialchars(trim(Q::G('version')));
		$sRelease=htmlspecialchars(trim(Q::G('release')));
		$sBug=htmlspecialchars(trim(Q::G('bug')));
		$nUpdate=intval(Q::G('update'));
		
		// 将数据保存到数据库
		$oServiceinstall=new ServiceinstallModel();
		$oServiceinstall->serviceinstall_ip=$sIp;
		$oServiceinstall->serviceinstall_domain=$sDomain;
		$oServiceinstall->serviceinstall_version=$sVersion;
		$oServiceinstall->serviceinstall_release=$sRelease;
		$oServiceinstall->serviceinstall_bug=$sBug;
		$oServiceinstall->serviceinstall_update=$nUpdate;
		$oServiceinstall->save();
		if($oServiceinstall->isError()){
			exit($oServiceinstall->getErrorMessage());
		}
	}

}
